#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
    int high[11] = { 0 };
    int i = 0;
    for (i = 0; i < 10; i++)
        scanf("%d", &high[i]);
    int max = 0;
    scanf("%d", &max);
    max += 30;
    int count = 0;
    for (i = 0; i < 10; i++)
    {
        if (high[i] <= max)
            count++;
    }
    printf("%d", count);
    return 0;
}